# -*- coding: utf-8 -*-
"""
@Project: base_python
@File: scatter_squares.py
@Author: PC
@Date: 2025/03/06
@Description: 
"""

# import matplotlib.pyplot as plt
# x_values = [1,2,3,4,5]
# y_values = [1,4,9,16,25]
# plt.scatter(x_values,y_values,s=100)
# # 设置图表标题并给坐标轴加上标签
# plt.title("Square Numbers",fontsize=24)
# plt.xlabel("Value",fontsize=14)
# plt.ylabel("Square of Value",fontsize=14)
# # 设置刻度标记的大小
# plt.tick_params(axis='both',which='major',labelsize=14)
# plt.show()


import matplotlib.pyplot as plt
x_values = list(range(1,5)) 
y_values = [x**3 for x in x_values]
# plt.scatter(x_values,y_values,c=(0,0.8,0.8),edgecolor='none',s=40)# 设置图表标题并给坐标轴加上标签
plt.scatter(x_values,y_values,c=y_values,cmap=plt.cm.Blues,
    edgecolor='none',s=40)
plt.title("Square Numbers",fontsize=24)
plt.xlabel("Value",fontsize=14)
plt.ylabel("Square of Value",fontsize=14)
# 设置每个坐标轴的取值范围
plt.axis([0,5,0,125])
plt.show()
# plt.savefig('squares_plot.png',bbox_inches='tight')